package com.studentManagement.dao;

import com.studentManagement.po.Student;
import com.studentManagement.po.Student_Leader;
import com.studentManagement.po.Student_simple;

import java.sql.SQLException;
import java.util.List;

/**
 * Created by Administrator on 2017/5/1 0001.
 */
public interface StudentDao {
    //查询学生信息（class_id）（sql分页）
    public List<Student_simple> queryStudentByClass_id(String class_id, int begin, int end);

    //查询学生头像路径（student_id)
    public String queryStudentImg(String student_id);

    //查询学生详细信息（student_id)
    public Student queryStudentDetail(String student_id);

    //更新学生详细信息（student_id)
    public boolean updateStudentDetail(Student student);

    //查询学生人数（class_id）
    public int queryStudentSumByClass_id(String class_id) throws SQLException;

    //根据关键词查询学生后的总条目
    public int queryStudentSumByKeywords(String keywords)throws SQLException;

    //添加学生
    public void addStudent(Student student) throws SQLException;

    //删除学生（student_id)
    public boolean deleteStudent(String student_id);

    //查询学号是否可用（student_id）
    public boolean Student_idCanUsed(String student_id);

    //查询班级委员的简单信息（class_id不包括室长）
    public List<Student_Leader> queryStudentLeader(String class_id);

    //查询班级委员的详细信息（class_id不包括室长）
    public List<Student> queryStudentLeaderDetail(String class_id);

    //根据关键词来获取相关的学生信息(第pageNum页，每页onePage条)
    public List<Student> getStudentDetail_byKeywords(String keyWords, int pageNum, int onePage);

}
